define(window.backboneCommon.getControllerDefine("Report"), function (require,Model,ModelCustomer) {
    var model=new Model();
    var modelCustomer=new ModelCustomer();
    return Backbone.Collection.extend({
        model:  model,
        initialize: function () {
            model.set({modelCustomer:modelCustomer});
        },
        initAfterDetail:function (id) {
            modelCustomer.getInfo(id);
        },
        getPageList:function(param){
            model.getPageList(param);
        },
        getReportList:function (type,param) {
            switch(type){
                case "city":
                    model.getListCity(param);
                    break;
                case "gender":
                    model.getListGender(param);
                    break;
                case "age":
                    model.getListAge(param);
                    break;
            }
        },
        downloadExcelByType:function (type,param) {
            switch(type){
                case "hour":
                    model.downloadExcelHour(param);
                    break;
                case "day":
                    model.downloadExcelDay(param);
                    break;
                case "strategyGroup":
                    model.downloadStrategyGroup(param);
                    break;
                case "strategy":
                    model.downloadStrategy(param);
                    break;
                case "city":
                    model.downloadCity(param);
                    break;
                case "gender":
                    model.downloadGender(param);
                    break;
                case "age":
                    model.downloadAge(param);
                    break;
            }
        }
    });
});